package dataSystem;

import java.util.List;
import java.util.ArrayList;

public class DataIntegrationCenter {
    private List<Order> salesData;
    private List<PurchaseOrder> purchaseData;
    private List<LogisticsInfo> logisticsData;
    
    public DataIntegrationCenter() {
        this.salesData = new ArrayList<>();
        this.purchaseData = new ArrayList<>();
        this.logisticsData = new ArrayList<>();
    }
    
    public void importSalesData(List<Order> data) {
        this.salesData.addAll(data);
    }
    
    public void importPurchaseData(List<PurchaseOrder> data) {
        this.purchaseData.addAll(data);
    }
    
    public void importLogisticsData(List<LogisticsInfo> data) {
        this.logisticsData.addAll(data);
    }
    
    public IntegratedData integrateData() {
        return new IntegratedData(salesData, purchaseData, logisticsData);
    }
    
    public static class IntegratedData {
        private List<Order> salesData;
        private List<PurchaseOrder> purchaseData;
        private List<LogisticsInfo> logisticsData;
        
        public IntegratedData(List<Order> salesData, List<PurchaseOrder> purchaseData, 
                            List<LogisticsInfo> logisticsData) {
            this.salesData = salesData;
            this.purchaseData = purchaseData;
            this.logisticsData = logisticsData;
        }
        
        public List<Order> getSalesData() { return salesData; }
        public List<PurchaseOrder> getPurchaseData() { return purchaseData; }
        public List<LogisticsInfo> getLogisticsData() { return logisticsData; }
    }
}